﻿@using StackExchange.Opserver.Controllers
@{
    this.SetPageTitle("错误");
}
<div class="row">
    <div class="col-md-6 col-md-offset-3 text-center" style="margin-top: 100px">
        <h1>
            <i class="fa fa-exclamation-triangle text-danger" aria-hidden="true"></i> Oh no, an error!
        </h1>
        <p>
            我很抱歉，出现了错误。
        </p>
        @if (Current.User.IsGlobalAdmin)
        {
            <p>您可以查看 <a href="~/admin/errors">错误日志</a> 来检查错误详情.</p>
        }
    </div>
</div>
@if (Current.User.IsGlobalAdmin)
{
    <!-- Actual error:
    @{
        var o = HttpContext.Current.ApplicationInstance.Application["LastError"] as Exception;
        if (o != null)
        {
            @o.GetBaseException().Message
        }
    }
    -->
}